home *** CD-ROM | disk | FTP | other *** search
/ Backpacker 2 (Sweden) / BackPacker 2 (Sweden) (Disc 1).7z / BackPacker 2 (Sweden) (Disc 1).bin / pc / bp_data / misc / end.dxr / 00001.ls next >
Encoding:
Text File  |  1997-01-01  |  2.5 KB  |  96 lines

  1. on exitFrame
  2.   global gTowns, gJobs, gPTotalResult, gCash, gCityDB, gShopDB
  3.   puppetSound("Sledge")
  4.   updateStage()
  5.   set K to count(gTowns) - 1
  6.   set L to []
  7.   repeat with n = 2 to K
  8.     if not getOne(L, getAt(gTowns, n)) then
  9.       append(L, 1)
  10.     end if
  11.   end repeat
  12.   set K to count(L)
  13.   repeat with n = 0 to K
  14.     set the text of field 111 to string(n)
  15.   end repeat
  16.   repeat while soundBusy(1)
  17.   end repeat
  18.   go(the frame + 1)
  19.   WaitH(30, 0)
  20.   puppetSound("Sledge")
  21.   updateStage()
  22.   set K to count(gJobs)
  23.   repeat with n = 0 to K
  24.     set the text of field 112 to string(n)
  25.   end repeat
  26.   repeat while soundBusy(1)
  27.   end repeat
  28.   go(the frame + 1)
  29.   WaitH(30, 0)
  30.   puppetSound("Sledge")
  31.   updateStage()
  32.   set Continent to getAt(getAt(gCityDB, PICDB(getLast(gTowns))), 4)
  33.   case Continent of
  34.     "NA":
  35.       set Continent to 1
  36.     "SA":
  37.       set Continent to 2
  38.     "AF":
  39.       set Continent to 3
  40.     "AU":
  41.       set Continent to 4
  42.     "EA":
  43.       set Continent to 5
  44.     "EE":
  45.       set Continent to 6
  46.     "EU":
  47.       set Continent to 7
  48.   end case
  49.   set currency to getAt(getAt(gCityDB, PICDB(getAt(gTowns, 1))), 6)
  50.   set exchangefactor to getAt(getAt(gCityDB, PICDB(getAt(gTowns, 1))), 7)
  51.   set LIVC to getAt(getAt(gCityDB, PICDB(getLast(gTowns))), 9)
  52.   set sum to 0
  53.   repeat with n = 1 to 5
  54.     if getAt(getAt(gPlayerPack, n), 1) then
  55.       set g to getAt(gShopDB, PISDB(getAt(getAt(gPlayerPack, n), 1)))
  56.       set supdemL to getAt(g, 4 + Continent)
  57.       set price to getAt(g, 4) * ((getAt(supdemL, 2) + 0.0) / (getAt(supdemL, 1) + 0.0)) * LIVC
  58.       set sum to sum + price
  59.     end if
  60.   end repeat
  61.   set sum to integer(sum / exchangefactor)
  62.   if sum > 1000 then
  63.     set the text of field 115 to string(sum)
  64.   else
  65.     repeat with n = 0 to sum
  66.       set the text of field 115 to string(n)
  67.     end repeat
  68.   end if
  69.   set the text of field 115 to the text of field 115 && currency
  70.   repeat while soundBusy(1)
  71.   end repeat
  72.   go(the frame + 1)
  73.   WaitH(30, 0)
  74.   puppetSound("Sledge")
  75.   updateStage()
  76.   set gCash to integer(gCash / exchangefactor)
  77.   if gCash > 1000 then
  78.     set the text of field 116 to string(gCash)
  79.   else
  80.     repeat with n = 0 to gCash
  81.       set the text of field 116 to string(n)
  82.     end repeat
  83.   end if
  84.   set the text of field 116 to the text of field 116 && currency
  85.   repeat while soundBusy(1)
  86.   end repeat
  87.   go(the frame + 2)
  88.   WaitH(30, 0)
  89.   puppetSound("Sledge")
  90.   updateStage()
  91.   set K to getAt(gPTotalResult, 1)
  92.   repeat with n = 0 to K
  93.     set the text of field 114 to string(n)
  94.   end repeat
  95. end
  96.